import type { FC } from "react";
import { Breadcrumb } from "antd";

export interface BreadcrumbItem {
  title: string;
  href?: string;
}

interface CustomBreadcrumbProps {
  items: BreadcrumbItem[];
}
const CustomBreadcrumb: FC<CustomBreadcrumbProps> = ({ items }) => {
  return (
    <Breadcrumb
      style={{ margin: "16px 0" }}
      items={[{ title: "首页", href: "/" }, ...items]}
    />
  );
};

export default CustomBreadcrumb;
